home *** CD-ROM | disk | FTP | other *** search
- " -------------------------------------------------------------------- "
- " IDCMPFlags Class is a Singleton class that allows the user to "
- " reference IDCMP Flags without having to remember their actual "
- " hexadecimal values. This Class is instantiated by the Intuition "
- " class. "
- ""
- " The User does NOT need to create one of these, since Intuition Class "
- " will instantiate the only needed instance of this Class. See the "
- " SetupIntuition.st source file for the method(s) that help the User "
- " with this Class. "
- ""
- " ALL singleton classes MUST contain the following: "
- ""
- " the methods: isSingleton AND privateSetup AND "
- " uniqueInstance Class instance variable. "
- " -------------------------------------------------------------------- "
-
- Class IDCMPFlags :Dictionary ! uniqueInstance !
- [
- isSingleton
- ^ true
- |
- privateNew ! newinstance !
- newinstance <- super new.
-
- ^ newinstance
- |
- new
- ^ self privateSetup
- |
- privateSetup
- (uniqueInstance isNil)
- ifTrue: [uniqueInstance <- self privateNew.
-
- self at: #IDCMP_SIZEVERIFY put: 1.
- self at: #IDCMP_NEWSIZE put: 2.
- self at: #IDCMP_REFRESHWINDOW put: 4.
- self at: #IDCMP_MOUSEBUTTONS put: 8.
-
- self at: #IDCMP_MOUSEMOVE put: 16r10.
- self at: #IDCMP_GADGETDOWN put: 16r20.
- self at: #IDCMP_GADGETUP put: 16r40.
- self at: #IDCMP_REQSET put: 16r80.
-
- self at: #IDCMP_MENUPICK put: 16r100.
- self at: #IDCMP_CLOSEWINDOW put: 16r200.
- self at: #IDCMP_RAWKEY put: 16r400.
- self at: #IDCMP_REQVERIFY put: 16r800.
-
- self at: #IDCMP_REQCLEAR put: 16r1000.
- self at: #IDCMP_MENUVERIFY put: 16r2000.
- self at: #IDCMP_NEWPREFS put: 16r4000.
- self at: #IDCMP_DISKINSERTED put: 16r8000.
-
- self at: #IDCMP_DISKREMOVED put: 16r10000.
-
- "16r20000 is for System use only"
-
- self at: #IDCMP_ACTIVEWINDOW put: 16r40000.
- self at: #IDCMP_INACTIVEWINDOW put: 16r80000.
-
- self at: #IDCMP_DELTAMOVE put: 16r100000.
- self at: #IDCMP_VANILLAKEY put: 16r200000.
- self at: #IDCMP_INTUITICKS put: 16r400000.
- self at: #IDCMP_IDCMPUPDATE put: 16r800000.
-
- self at: #IDCMP_MENUHELP put: 16r1000000.
- self at: #IDCMP_CHANGEWINDOW put: 16r2000000.
- self at: #IDCMP_GADGETHELP put: 16r4000000.
- ].
-
- ^ self "uniqueInstance??"
- ]
-